@import "../styles/_base.less";
@import "../styles/_mixins.less";

.i-modal{
    position: fixed;
    overflow: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    z-index: @zindex-modal;
    display: flex;
    outline: none;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    transform: translateZ(1px);

    opacity: 0;
    visibility: hidden;

    &-show{
        visibility: visible;
        opacity: 1;
    }

    &-mask{
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: @zindex-modal;
        transition: all @transition-time ease-in-out;
        opacity: 0;
        visibility: hidden;

        &-show{
            opacity: 1;
            visibility: visible;
        }
    }

    &-main{
        width: 270px;
        position: relative;
    }

    &-content{
        border-radius: 7px;
        padding-top: 15px;
        position: relative;
        background-color: #fff;
        border: 0;
        background-clip: padding-box;
        text-align: center;
        height: 100%;
        overflow: hidden;
    }

    &-body{
        max-height: 100px;
        margin-bottom: 15px;
        font-size: @size-font-base;
        color: @subsidiary-color;
        height: 100%;
        line-height: 1.5;
        overflow: auto;
    }

    &-title{
        padding: 6px 15px 15px;
        margin: 0;
        font-size: 18px;
        line-height: 1;
        color: @title-color;
        text-align: center;
    }

    &-actions{
        margin: 0 1px;
    }
    &-action{
        &-vertical{
            position: relative;
            &:after{
                .hairline();
                border-top-width: 1px;
            }
        }
    }

    &-grid{
        border-radius: 0 0 7px 7px;
        border-left: none;
        &-item, &-item-last{
            padding: 0;
            border-bottom: none;
        }
        &-item-last{
            border-right: none;
        }
    }

    &-btn{
        &-ok{
            color: @primary-color !important;
        }

        &-loading{
            display: inline-block;
            vertical-align: middle;
            margin-right: 10px;
            width: 12px;
            height: 12px;
            background: transparent;
            border-radius: 50%;
            border: 2px solid #e5e5e5;
            border-color: #666 #e5e5e5 #e5e5e5 #e5e5e5;
            animation: btn-spin 0.6s linear;
            animation-iteration-count: infinite;
        }

        &-text{
            display: inline-block;
            vertical-align: middle;
        }

        &-icon{
            font-size: @size-font-base !important;
            margin-right: 4px;
        }
    }
}

@keyframes btn-spin {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}